package TransactionImplementation

import (
	"SPC/AbstractTransactions"
	"SPC/Model"
	"SPC/ModelImplementation"
)

type ChangeHourlyTransaction struct {
	AbstractTransactions.ChangeClassificationTransaction
	itsHourlyRate float64
}

func NewChangeHourlyTransaction(empid int, hourlyRate float64) *ChangeHourlyTransaction {
	n := &ChangeHourlyTransaction{
		*AbstractTransactions.NewChangeClassificationTransaction(empid),
		hourlyRate,
	}
	n.ChangeClassificationTransaction.GetClassification = n.GetClassification
	n.ChangeClassificationTransaction.GetSchedule = n.GetSchedule
	return n
}

func (c *ChangeHourlyTransaction) GetClassification() Model.PaymentClassification {
	return ModelImplementation.NewHourlyClassification(c.itsHourlyRate)
}

func (c *ChangeHourlyTransaction) GetSchedule() Model.PaymentSchedule {
	return &ModelImplementation.WeeklySchedule{}
}